package com.example.service;

import com.example.domain.Product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author zihong.zheng
 * @version 1.0
 * @date 2018/4/18
 * @time 22:29
 * @description
 */
@Component
public class ProductService {

    @Autowired
    private AuthService authService;

    @AdminOnly
    public void insertProduct(Product product){
        System.out.println("添加产品");
    }

    public void deleteProduct(long id){
        authService.checkAccess();
        System.out.println("删除操作");
    }
}
